package ctrdashboard

import (
	"cloud_worm/wormweb/controllers/ctrconfig"
	"cloud_worm/util/uhttp"
)

type HeaderCtr struct {
	ctrconfig.LoginCtr
}

func (h *HeaderCtr) HeadData()  {
	if h.Guest() == false {
		return
	}

	type HeadData struct {
		MachineCnt 		int
		OnlineCnt 		int
		TaskCnt 		int
		AlertCnt 		int
	}
	mData := HeadData{
		MachineCnt: 12423,
		OnlineCnt: 10400,
		TaskCnt: 34,
		AlertCnt: 254301,
	}
	// TODO:

	h.Data["json"] = uhttp.CreateOkResponse(mData)
	h.ServeJSON()
	return
}
